<block name="body"> 	
    <form action="{:U()}" method="post" id="info_form" name="info_form"  class="form-horizontal form-wrap"> 
	   <table class="table_form" style="width:800px;">
           <tr>
              <th>标题</th>
              <td>
                  <input type="text" class="text input-7x" name="title"  id="title"  value="{$info.title|default=''}">
                   <span class="check-tips">（用于后台显示的配置标题）</span>
              </td>
           <tr>
           <tr>
              <th>排序</th>
              <td>
                <input type="text" class="text input-small" name="sort" value="{$info.sort|default=0}">
				<span class="check-tips">（用于分组显示的顺序）</span>
              </td>
           <tr>
           <tr>
              <th>链接</th>
              <td>
                  <input type="text" class="text input-7x" name="url" value="{$info.url|default=''}">
				  <span class="check-tips">（U函数解析的URL或者外链）</span>
              </td>
           <tr>

           <tr>
              <th>上级菜单</th>
              <td>
                <select name="pid">
                    <volist name="Menus" id="menu">
                        <option value="{$menu.id}">{$menu.title_show}</option>
                    </volist>
                </select>
              </td>
           <tr>

           <tr>
              <th>分组</th>
              <td>
                  <input type="text" class="text input-7x" name="group" value="{$info.group|default=''}">
				   <span class="check-tips">（用于左侧分组二级菜单）</span>
              </td>
           <tr>

           <tr>
              <th>是否隐藏</th>
              <td>
                <label class="radio"><input type="radio" name="hide" value="1">是</label>
                <label class="radio"><input type="radio" name="hide" value="0">否</label>
              </td>
           <tr>

           <tr>
              <th>仅开发者<br>模式可见</th>
              <td>
               <label class="radio"><input type="radio" name="is_dev" value="1">是</label>
                <label class="radio"><input type="radio" name="is_dev" value="0">否</label>
              </td>
           <tr>

           <tr>
              <th>说明</th>
              <td>
                <input type="text" class="text input-large" name="tip" value="{$info.tip|default=''}">    
                <input type="hidden" name="id" value="{$info.id|default=''}">           
              </td>
           <tr>	   
       </table>  
    </form>
</block>

<block name="script">
<script type="text/javascript" charset="utf-8">                 
 
    $(function() {       
      $('#info_form').ajaxForm({beforeSubmit: showloading, success: complate, dataType: 'json'});         
       function showloading() { 
		   title=$('#title').val();
		   if(title==''){
			   think.tip_error('标题不能为空!');
			   return false;
			  }
        }  
        function complate(result) {
            if (result.status == 1) {
                  think.tip_success('保存成功');
                  window.location.reload();
            } else {
                think.tip_error(result.msg);
            }
        }
    });

</script> 

    <script type="text/javascript">
        Think.setValue("pid", {$info.pid|default = 0});
        Think.setValue("hide", {$info.hide|default = 0});
        Think.setValue("is_dev", {$info.is_dev|default = 0});
        //导航高亮
        highlight_subnav('{:U('index')}');
    </script>
</block>